package com.cn.ctrl

import com.cn.Pig
import com.cn.dto.Cat
import com.cn.dto.Dog
import org.springframework.boot.autoconfigure.SpringBootApplication
import org.springframework.boot.runApplication
import org.springframework.web.bind.annotation.GetMapping
import org.springframework.web.bind.annotation.RequestMapping
import org.springframework.web.bind.annotation.RestController

@RestController
@RequestMapping("user")
open class User {
    @GetMapping("a")
    fun apig(): Pig {
        return Pig("aa")
    }

    @GetMapping("b")
    fun adog(): Dog {
        return Dog
    }
    @GetMapping("c")
    fun acat(): Cat {
        return Cat("aaa", 4, "flower")
    }
}
